package com.itheima.thread.api.demo06;

public class MyThreadDemo06 {

    public static void main(String[] args) {

        for (int i = 0; i < 5; i++) {
            if (i == 3){
                MyThread t1 = new MyThread();
                t1.setName("A");
                t1.start();
                try {
                    t1.join();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println(Thread.currentThread().getName() + "," + i);
        }
    }
}
